/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package STUDENT.NGUYENSANG.OOPs.QuanLiThuVien;

/**
 *
 * @author NSPDL
 */
public class BangQuanLi implements UserFile{
   private Sach sach;
   private BanDoc bandoc;
   private int soLuong;

    public BangQuanLi(Sach sach, BanDoc bandoc, int soLuong) {
        this.sach = sach;
        this.bandoc = bandoc;
        this.soLuong = soLuong;
    }

    public Sach getSach() {
        return sach;
    }

    public void setSach(Sach sach) {
        this.sach = sach;
    }

    public BanDoc getBandoc() {
        return bandoc;
    }

    public void setBandoc(BanDoc bandoc) {
        this.bandoc = bandoc;
    }

    public int getSoLuong() {
        return soLuong;
    }

    public void setSoLuong(int soLuong) {
        this.soLuong = soLuong;
    }
   public String getTenBanDoc()
   {
       return bandoc.getTen();
   }
   public int getMaSach()
   {
       return sach.getMaSach();
   }
   public int getMaBanDoc()
   {
       return bandoc.getMaID();
   }
    @Override
    public Object[] toObject() {
     return new Object[]{getMaBanDoc(),getTenBanDoc(),getMaSach(),getSach(),soLuong};
    }
    @Override
    public String toString()
    {
        return (""+this.getMaBanDoc()+" "+this.getTenBanDoc()+" "+this.getMaSach()+" "+this.getSach()+""+this.getSoLuong());
    }
}
